package zhishu.iceyyy.com.bxq_2500.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

import zhishu.iceyyy.com.bxq_2500.base.ALL_CONFIG;
import zhishu.iceyyy.com.bxq_2500.bean.Type;


/**
 * Created by 智江鹏 on 2016/11/18.
 * 我的买采购商适配器
 */

public class SynBuy_CGS_FragmentAdapter extends FragmentPagerAdapter {
    ;
    private List<Type.DataBean> titleStr = ALL_CONFIG.dataBeans;


    List li;

    public SynBuy_CGS_FragmentAdapter(FragmentManager fm, List<Fragment> li) {
        super(fm);

        this.li = li;


    }

    @Override
    public Fragment getItem(int position) {
        return (Fragment) li.get(position);
    }

    @Override
    public CharSequence getPageTitle(int position) {

        return titleStr.get(position).getType_name();
    }

    @Override
    public int getItemPosition(Object object) {

        return POSITION_NONE;
    }

    @Override
    public int getCount() {

        return titleStr.size();
    }

}
